import request from '@/utils/request'

import { objectToFormData } from '@/utils/form'

export function findSceneLayerList(data) {
  return request({
    url: '/51world/scene/layer/findList',
    method: 'get',
    params:data
  })
}

export function getSceneLayerOptionsTree() {
  return request({
    url: '/51world/scene/layer/getOptionsTree',
    method: 'get',
  })
}

export function saveSceneLayer(data) {
  return request({
    url: '/51world/scene/layer/save',
    method: 'post',
    data: objectToFormData(data)
  })
}

export function deleteSceneLayer(data) {
  return request({
    url: '/51world/scene/layer/delete',
    method: 'get',
    params:data
  })
}

export function genSceneLayerRoot(data) {
  return request({
    url: '/51world/scene/layer/genRoot',
    method: 'get',
    params:data
  })
}


export function getOptionsByLayer(params) {
  return request({
    url: '/51world/scene/getOptionsByLayer',
    method: 'get',
    params:params
  })
}
